package com.then.component.login.ui.register;

import com.then.architecture.VOCreator;
import com.then.component.login.BR;
import com.then.component.login.R;
import com.then.component.login.databinding.ActivityRegisterBinding;
import com.then.component.login.ui.base.LoginModuleDelegate;

/**
 * Created by 42524 on 2018/1/22.
 */

public class RegisterDelegate extends LoginModuleDelegate<RegisterVo, ActivityRegisterBinding> {


    @Override
    public int getRootLayoutId() {
        return R.layout.activity_register;
    }

    protected String getPhoneNum() {
        return vo.phoneNum.get();
    }

    protected String getPwd() {
        return vo.pwd.get();
    }

    protected String getCaptcha(){
        return vo.captcha.get();
    }

    protected void setErrorCode(int errorCode){
        vo.errorInfo.set(getLoginErrorMsg(errorCode));
    }

    @Override
    protected VOCreator createVo() {
        return new VOCreator(RegisterVo.class, BR.vo);
    }
}
